from rest_framework import serializers
from . import models

class ActorUnserializers(serializers.Serializer):
    name=serializers.CharField(max_length=32)

    def create(self, validated_data):
        return models.Actor.objects.create(**validated_data)

class Actorserializers(serializers.Serializer):

    class Meta:
        model=models.Actor
        fields='__all__'

class MoviesUnserializers(serializers.Serializer):

    class Meta:
        model=models.Movies
        fields='__all__'







8